<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <title>网站资源提交</title>
    <div th:replace="admin/_fragments-admin::basicrefrence"></div>
</head>


<!--网页主体-->
<body>

<!--网页头-->
<nav th:replace="admin/_fragments-admin::nav"></nav>
<div th:replace="admin/_fragments-admin::Seconednav"></div>


<div class="m-tenDistance">
    <div class="ui container">
        <div class="ui segment">

            <button class="ui inverted blue button" onclick="submitSite('baidu')">百度</button>

        </div>
    </div>
</div>


<footer th:replace="admin/_fragments-admin::footer"></footer>


</body>

<script type="text/javascript">

    function submitSite(which) {
        if(confirm("确认提交吗")){
            $.ajax({
                url:"/admin/siteSubmit/submit",
                data:{
                    which:which
                } ,
                success:function (resp) {
                    console.log(resp);
                    if (resp.code === 1){
                        alert(resp.data);
                    }else {
                        alert("报错啦：" + resp.msg);
                    }

                }
            });
        }
    }



</script>

</html>